﻿using Mirror;
using UnityEngine;

namespace NetTest
{
    public class NetworkStart:MonoBehaviour
    {
        public bool ApplyServer;
        private NetworkManager _networkManager;

        private void Awake()
        {
            _networkManager = GetComponent<NetworkManager>();
        }
        private void Start()
        {
            if (ApplyServer) 
            {
                _networkManager.StartServer();
            }
            else 
            {
                _networkManager.StartClient();
            }
        }
    }
}
